﻿using System;
namespace Meeting.Model
{
    /// <summary>
    /// TopicDocument:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class TopicDocument
    {
        public TopicDocument()
        { }

        #region Model
        private Guid _id;
        private Guid _topicid;
        private int _sort = 1;
        private string _path;
        private string _name;
        private string _format;
        private DateTime _uploaddate;
        private string _comment = "";
        private bool _isactive = true;
        private int _imagecount = 0;
        private bool _type = true;
        private int _meetingid = 0;
        private int _documentcategory = 2;
        /// <summary>
        /// 
        /// </summary>
        public Guid Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid TopicId
        {
            set { _topicid = value; }
            get { return _topicid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int Sort
        {
            set { _sort = value; }
            get { return _sort; }
        }
        /// <summary>
        /// 存储路径
        /// </summary>
        public string Path
        {
            set { _path = value; }
            get { return _path; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Format
        {
            set { _format = value; }
            get { return _format; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime UploadDate
        {
            set { _uploaddate = value; }
            get { return _uploaddate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Comment
        {
            set { _comment = value; }
            get { return _comment; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool IsActive
        {
            set { _isactive = value; }
            get { return _isactive; }
        }
        /// <summary>
        /// 生成图片数
        /// </summary>
        public int ImageCount
        {
            set { _imagecount = value; }
            get { return _imagecount; }
        }
        /// <summary>
        /// 类型
        /// </summary>
        public bool Type
        {
            set { _type = value; }
            get { return _type; }
        }
        /// <summary>
        /// 所属会议ID
        /// </summary>
        public int MeetingId
        {
            set { _meetingid = value; }
            get { return _meetingid; }
        }
        /// <summary>
        /// 文档类型（1：议题呈批表，2：相关文档）
        /// </summary>
        public int DocumentCategory
        {
            set { _documentcategory = value; }
            get { return _documentcategory; }
        }
        #endregion Model

        #region 附加属性
        /// <summary>
        /// 文件在服务器上的存储路径
        /// </summary>
        public string FilePath
        {
            get
            {
                return this.Path + "/" + this.TopicId + "/" + this.Id + "." + this.Format;
            }
        }

        /// <summary>
        /// 文件图片在服务器上的存储文件夹
        /// </summary>
        public string ImageDir
        {
            get
            {
                return this.Path + "/" + this.TopicId + "/" + this.Id;
            }
        }
        #endregion
    }
}

